
<div class="table-body">
    <table id="planUnrelUserTable" lay-filter="planUnrelUserTable"></table>
</div>

<script>
    layui.use(['table','form','layer'],function(){
        var layer = layui.layer, table = layui.table,form = layui.form;
        //执行渲染
        table.render({
            elem: '#planUnrelUserTable', //指定原始表格元素选择器（推荐id选择器）
            height: '340',
            cellMinWidth: '80',
            page: 'true',
            limit:'20',
            id:'planUnrelUserTable',
            url: "{:url('PlanStudentRel/getPlanUnrelList')}",
            cols: [[ //标题栏               
                { type: 'numbers' },
                { field: 'id', title: 'ID', hide:true},
                { field: 'plan_year', sort: true, title: '年度', width: 80, align: 'center' },
                { field: 'plan_season', sort: true, title: '季度', width: 80, align: 'center' },
                { field: 'dept_name', sort: true, title: '部/院', width: 120, align: 'center' },
                { field: 'specialty_name', sort: true, title: '专业', width: 200, align: 'center' },
                { field: 'plan_class_name', sort: true, title: '班级', width: 240, align: 'center' },
                { field: 'plan_dirName', sort: true, title: '方向', width: 80, align: 'center' },
                { field: 'plan_grade', sort: true, title: '年级', width: 80, align: 'center' },
                { field: 'plan_degree_name', sort: true, title: '层次', width: 160, align: 'center' },
            ]] //设置表头
            //,…… //更多参数参考右侧目录：基本参数选项
        });

        // 查询
        form.on('submit(unrel_search)', function (data) {
            table.reload('planUnrelUserTable', {
                where: data.field,
            });

            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });

    })
</script>